<template>
	<view>
		<!-- 顶部导航 -->
		<fa-navbar :title="'详情'" ref="navbar"></fa-navbar>
		<view class="content">
			<view class="detail">
				<view class="title">{{detail.name}}</view>
				<view class="time">
					<u-icon name="clock" size="24" color="#999999"></u-icon>
					<text class="u-m-l-10">{{detail.createtime_text}}</text>
				</view>
				<u-line margin="24rpx 0"></u-line>
				<view class="intro">
					<u-parse :content="detail.content" :tagStyle="vuex_parse_style"
						:domain="vuex_config.upload ? vuex_config.upload.cdnurl : ''" @linkTap="navigate"></u-parse>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail:[],
				articleId:0,
			};
		},
		onLoad(e) {
			this.articleId = e.article_id
			this.getDetail()
		},
		methods:{
			getDetail(){
				this.$api.getPolicyDetail({params:{id:this.articleId}}).then((res)=>{
					if(res.code){
						this.detail = res.data
					}else{
						uni.$u.toast(res.msg);
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		padding: 208rpx 24rpx 280rpx;
	}
	.detail{
		padding: 32rpx 24rpx;
		border-radius: 20rpx;
		background-color: #ffffff;
		.title{
			font-size: 32rpx;
			color: #333333;
			font-weight: 600;
			line-height: 48rpx;
			margin-bottom: 24rpx;
		}
		.time{
			display: flex;
			align-items: center;
			color: #999999;
			font-size: 24rpx;
		}
	}
</style>
